<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>&lt;GKeyFile&gt;: </title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.2">
<link rel="home" href="index.html" title="">
<link rel="up" href="ch01.html" title="GLib">
<link rel="prev" href="re27.html" title="&lt;%GLibIOStatus&gt;">
<link rel="next" href="re29.html" title="&lt;%GLibKeyFileError&gt;">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
<td><a accesskey="p" href="re27.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="re29.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="id-1.1.29"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2>&lt;GKeyFile&gt;</h2>
<p>&lt;GKeyFile&gt;</p>
</div>
<div class="refsect1">
<a name="id-1.1.29.2"></a><h2>Description</h2>
<p>The GKeyFile struct contains only private data
and should not be accessed directly.</p>
</div>
<div class="refsect1">
<a name="id-1.1.29.3"></a><h2>Functions</h2>
<div class="refsect2">
<a name="id-1.1.29.3.2"></a><h3>get-boolean?</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:get-boolean? self group-name key))
</pre></div>
<p>Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as a
boolean.
</p>
<p>If <em class="parameter"><code>key</code></em> cannot be found then <code class="constant">FALSE</code> is returned and <em class="parameter"><code>error</code></em> is set
to <span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>. Likewise, if the value
associated with <em class="parameter"><code>key</code></em> cannot be interpreted as a boolean then <code class="constant">FALSE</code>
is returned and <em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_INVALID_VALUE</span>.</p>
<div class="refsect3">
<a name="id-1.1.29.3.2.5"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.3"></a><h3>get-boolean-list</h3>
<div class="informalexample"><pre class="programlisting">(define-values
  (%return length)
  (key-file:get-boolean-list self group-name key))
</pre></div>
<p>Returns the values associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as
booleans.
</p>
<p>If <em class="parameter"><code>key</code></em> cannot be found then <code class="constant">NULL</code> is returned and <em class="parameter"><code>error</code></em> is set to
<span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>. Likewise, if the values associated
with <em class="parameter"><code>key</code></em> cannot be interpreted as booleans then <code class="constant">NULL</code> is returned
and <em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_INVALID_VALUE</span>.</p>
<div class="refsect3">
<a name="id-1.1.29.3.3.5"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description">
<p>the number of booleans returned</p>
<p>Inferred from <code class="code">%return</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.4"></a><h3>get-comment</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:get-comment self group-name key))
</pre></div>
<p>Retrieves a comment above <em class="parameter"><code>key</code></em> from <em class="parameter"><code>group_name</code></em>.
If <em class="parameter"><code>key</code></em> is <code class="constant">NULL</code> then <em class="parameter"><code>comment</code></em> will be read from above
<em class="parameter"><code>group_name</code></em>. If both <em class="parameter"><code>key</code></em> and <em class="parameter"><code>group_name</code></em> are <code class="constant">NULL</code>, then
<em class="parameter"><code>comment</code></em> will be read from above the first group in the file.
</p>
<p>Note that the returned string does not include the '#' comment markers,
but does include any whitespace after them (on each line). It includes
the line breaks between lines, but does not include the final line break.</p>
<div class="refsect3">
<a name="id-1.1.29.3.4.5"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name, or <code class="constant">NULL</code></p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.5"></a><h3>get-double</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:get-double self group-name key))
</pre></div>
<p>Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as a
double. If <em class="parameter"><code>group_name</code></em> is <code class="constant">NULL</code>, the start_group is used.
</p>
<p>If <em class="parameter"><code>key</code></em> cannot be found then 0.0 is returned and <em class="parameter"><code>error</code></em> is set to
<span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>. Likewise, if the value associated
with <em class="parameter"><code>key</code></em> cannot be interpreted as a double then 0.0 is returned
and <em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_INVALID_VALUE</span>.</p>
<div class="refsect3">
<a name="id-1.1.29.3.5.5"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.6"></a><h3>get-double-list</h3>
<div class="informalexample"><pre class="programlisting">(define-values
  (%return length)
  (key-file:get-double-list self group-name key))
</pre></div>
<p>Returns the values associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as
doubles.
</p>
<p>If <em class="parameter"><code>key</code></em> cannot be found then <code class="constant">NULL</code> is returned and <em class="parameter"><code>error</code></em> is set to
<span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>. Likewise, if the values associated
with <em class="parameter"><code>key</code></em> cannot be interpreted as doubles then <code class="constant">NULL</code> is returned
and <em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_INVALID_VALUE</span>.</p>
<div class="refsect3">
<a name="id-1.1.29.3.6.5"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description">
<p>the number of doubles returned</p>
<p>Inferred from <code class="code">%return</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.7"></a><h3>get-groups</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return length) (key-file:get-groups self))
</pre></div>
<p>Returns all groups in the key file loaded with <em class="parameter"><code>key_file</code></em>.
The array of returned groups will be <code class="constant">NULL</code>-terminated, so
<em class="parameter"><code>length</code></em> may optionally be <code class="constant">NULL</code>.</p>
<div class="refsect3">
<a name="id-1.1.29.3.7.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description">
<p>return location for the number of returned groups, or <code class="constant">NULL</code></p>
<p>Passed as <code class="code">length</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.8"></a><h3>get-int64</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:get-int64 self group-name key))
</pre></div>
<p>Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as a signed
64-bit integer. This is similar to <code class="function">g_key_file_get_integer()</code> but can return
64-bit results without truncation.</p>
<div class="refsect3">
<a name="id-1.1.29.3.8.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a non-<code class="constant">NULL</code> <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a non-<code class="constant">NULL</code> group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a non-<code class="constant">NULL</code> key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.9"></a><h3>get-integer</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:get-integer self group-name key))
</pre></div>
<p>Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as an
integer.
</p>
<p>If <em class="parameter"><code>key</code></em> cannot be found then 0 is returned and <em class="parameter"><code>error</code></em> is set to
<span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>. Likewise, if the value associated
with <em class="parameter"><code>key</code></em> cannot be interpreted as an integer, or is out of range
for a <span class="type">gint</span>, then 0 is returned
and <em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_INVALID_VALUE</span>.</p>
<div class="refsect3">
<a name="id-1.1.29.3.9.5"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.10"></a><h3>get-integer-list</h3>
<div class="informalexample"><pre class="programlisting">(define-values
  (%return length)
  (key-file:get-integer-list self group-name key))
</pre></div>
<p>Returns the values associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as
integers.
</p>
<p>If <em class="parameter"><code>key</code></em> cannot be found then <code class="constant">NULL</code> is returned and <em class="parameter"><code>error</code></em> is set to
<span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>. Likewise, if the values associated
with <em class="parameter"><code>key</code></em> cannot be interpreted as integers, or are out of range for
<span class="type">gint</span>, then <code class="constant">NULL</code> is returned
and <em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_INVALID_VALUE</span>.</p>
<div class="refsect3">
<a name="id-1.1.29.3.10.5"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description">
<p>the number of integers returned</p>
<p>Inferred from <code class="code">%return</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.11"></a><h3>get-keys</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return length) (key-file:get-keys self group-name))
</pre></div>
<p>Returns all keys for the group name <em class="parameter"><code>group_name</code></em>.  The array of
returned keys will be <code class="constant">NULL</code>-terminated, so <em class="parameter"><code>length</code></em> may
optionally be <code class="constant">NULL</code>. In the event that the <em class="parameter"><code>group_name</code></em> cannot
be found, <code class="constant">NULL</code> is returned and <em class="parameter"><code>error</code></em> is set to
<span class="type">G_KEY_FILE_ERROR_GROUP_NOT_FOUND</span>.</p>
<div class="refsect3">
<a name="id-1.1.29.3.11.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description">
<p>return location for the number of keys returned, or <code class="constant">NULL</code></p>
<p>Passed as <code class="code">length</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.12"></a><h3>get-locale-for-key</h3>
<div class="informalexample"><pre class="programlisting">(define-values
  (%return)
  (key-file:get-locale-for-key self group-name key locale))
</pre></div>
<p>Returns the actual locale which the result of
<code class="function">g_key_file_get_locale_string()</code> or <code class="function">g_key_file_get_locale_string_list()</code>
came from.
</p>
<p>If calling <code class="function">g_key_file_get_locale_string()</code> or
<code class="function">g_key_file_get_locale_string_list()</code> with exactly the same <em class="parameter"><code>key_file</code></em>,
<em class="parameter"><code>group_name</code></em>, <em class="parameter"><code>key</code></em> and <em class="parameter"><code>locale</code></em>, the result of those functions will
have originally been tagged with the locale that is the result of
this function.</p>
<div class="refsect3">
<a name="id-1.1.29.3.12.5"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>locale</p></td>
<td class="parameter_description">
<p>a locale identifier or <code class="constant">NULL</code></p>
<p>Passed as <code class="code">locale</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.13"></a><h3>get-locale-string</h3>
<div class="informalexample"><pre class="programlisting">(define-values
  (%return)
  (key-file:get-locale-string self group-name key locale))
</pre></div>
<p>Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>
translated in the given <em class="parameter"><code>locale</code></em> if available.  If <em class="parameter"><code>locale</code></em> is
<code class="constant">NULL</code> then the current locale is assumed.
</p>
<p>If <em class="parameter"><code>locale</code></em> is to be non-<code class="constant">NULL</code>, or if the current locale will change over
the lifetime of the <span class="type">GKeyFile</span>, it must be loaded with
<code class="constant">G_KEY_FILE_KEEP_TRANSLATIONS</code> in order to load strings for all locales.
</p>
<p>If <em class="parameter"><code>key</code></em> cannot be found then <code class="constant">NULL</code> is returned and <em class="parameter"><code>error</code></em> is set
to <span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>. If the value associated
with <em class="parameter"><code>key</code></em> cannot be interpreted or no suitable translation can
be found then the untranslated value is returned.</p>
<div class="refsect3">
<a name="id-1.1.29.3.13.6"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>locale</p></td>
<td class="parameter_description">
<p>a locale identifier or <code class="constant">NULL</code></p>
<p>Passed as <code class="code">locale</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.14"></a><h3>get-locale-string-list</h3>
<div class="informalexample"><pre class="programlisting">(define-values
  (%return length)
  (key-file:get-locale-string-list self group-name key locale))
</pre></div>
<p>Returns the values associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>
translated in the given <em class="parameter"><code>locale</code></em> if available.  If <em class="parameter"><code>locale</code></em> is
<code class="constant">NULL</code> then the current locale is assumed.
</p>
<p>If <em class="parameter"><code>locale</code></em> is to be non-<code class="constant">NULL</code>, or if the current locale will change over
the lifetime of the <span class="type">GKeyFile</span>, it must be loaded with
<code class="constant">G_KEY_FILE_KEEP_TRANSLATIONS</code> in order to load strings for all locales.
</p>
<p>If <em class="parameter"><code>key</code></em> cannot be found then <code class="constant">NULL</code> is returned and <em class="parameter"><code>error</code></em> is set
to <span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>. If the values associated
with <em class="parameter"><code>key</code></em> cannot be interpreted or no suitable translations
can be found then the untranslated values are returned. The
returned array is <code class="constant">NULL</code>-terminated, so <em class="parameter"><code>length</code></em> may optionally
be <code class="constant">NULL</code>.</p>
<div class="refsect3">
<a name="id-1.1.29.3.14.6"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>locale</p></td>
<td class="parameter_description">
<p>a locale identifier or <code class="constant">NULL</code></p>
<p>Passed as <code class="code">locale</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description">
<p>return location for the number of returned strings or <code class="constant">NULL</code></p>
<p>Inferred from <code class="code">%return</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.15"></a><h3>get-start-group</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:get-start-group self))
</pre></div>
<p>Returns the name of the start group of the file.</p>
<div class="refsect3">
<a name="id-1.1.29.3.15.4"></a><h4>Parameters</h4>
<div class="informaltable"><table><tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr></table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.16"></a><h3>get-string</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:get-string self group-name key))
</pre></div>
<p>Returns the string value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
Unlike <code class="function">g_key_file_get_value()</code>, this function handles escape sequences
like \s.
</p>
<p>In the event the key cannot be found, <code class="constant">NULL</code> is returned and
<em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>.  In the
event that the <em class="parameter"><code>group_name</code></em> cannot be found, <code class="constant">NULL</code> is returned
and <em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_GROUP_NOT_FOUND</span>.</p>
<div class="refsect3">
<a name="id-1.1.29.3.16.5"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.17"></a><h3>get-string-list</h3>
<div class="informalexample"><pre class="programlisting">(define-values
  (%return length)
  (key-file:get-string-list self group-name key))
</pre></div>
<p>Returns the values associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
</p>
<p>In the event the key cannot be found, <code class="constant">NULL</code> is returned and
<em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>.  In the
event that the <em class="parameter"><code>group_name</code></em> cannot be found, <code class="constant">NULL</code> is returned
and <em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_GROUP_NOT_FOUND</span>.</p>
<div class="refsect3">
<a name="id-1.1.29.3.17.5"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description">
<p>return location for the number of returned strings, or <code class="constant">NULL</code></p>
<p>Inferred from <code class="code">%return</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.18"></a><h3>get-uint64</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:get-uint64 self group-name key))
</pre></div>
<p>Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as an unsigned
64-bit integer. This is similar to <code class="function">g_key_file_get_integer()</code> but can return
large positive results without truncation.</p>
<div class="refsect3">
<a name="id-1.1.29.3.18.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a non-<code class="constant">NULL</code> <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a non-<code class="constant">NULL</code> group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a non-<code class="constant">NULL</code> key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.19"></a><h3>get-value</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:get-value self group-name key))
</pre></div>
<p>Returns the raw value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
Use <code class="function">g_key_file_get_string()</code> to retrieve an unescaped UTF-8 string.
</p>
<p>In the event the key cannot be found, <code class="constant">NULL</code> is returned and
<em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span>.  In the
event that the <em class="parameter"><code>group_name</code></em> cannot be found, <code class="constant">NULL</code> is returned
and <em class="parameter"><code>error</code></em> is set to <span class="type">G_KEY_FILE_ERROR_GROUP_NOT_FOUND</span>.</p>
<div class="refsect3">
<a name="id-1.1.29.3.19.5"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.20"></a><h3>has-group?</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:has-group? self group-name))
</pre></div>
<p>Looks whether the key file has the group <em class="parameter"><code>group_name</code></em>.</p>
<div class="refsect3">
<a name="id-1.1.29.3.20.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.21"></a><h3>load-from-bytes?</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:load-from-bytes? self bytes flags))
</pre></div>
<p>Loads a key file from the data in <em class="parameter"><code>bytes</code></em> into an empty <span class="type">GKeyFile</span> structure.
If the object cannot be created then <code class="constant">error</code> is set to a <span class="type">GKeyFileError</span>.</p>
<div class="refsect3">
<a name="id-1.1.29.3.21.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>an empty <span class="type">GKeyFile</span> struct</p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>bytes</p></td>
<td class="parameter_description">
<p>a <span class="type">GBytes</span></p>
<p>Passed as <code class="code">bytes</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description">
<p>flags from <span class="type">GKeyFileFlags</span></p>
<p>Passed as <code class="code">flags</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.22"></a><h3>load-from-data?</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:load-from-data? self data length flags))
</pre></div>
<p>Loads a key file from memory into an empty <span class="type">GKeyFile</span> structure.
If the object cannot be created then <code class="constant">error</code> is set to a <span class="type">GKeyFileError</span>.</p>
<div class="refsect3">
<a name="id-1.1.29.3.22.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>an empty <span class="type">GKeyFile</span> struct</p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description">
<p>key file loaded in memory</p>
<p>Passed as <code class="code">data</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description">
<p>the length of <em class="parameter"><code>data</code></em> in bytes (or (gsize)-1 if data is nul-terminated)</p>
<p>Passed as <code class="code">length</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description">
<p>flags from <span class="type">GKeyFileFlags</span></p>
<p>Passed as <code class="code">flags</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.23"></a><h3>load-from-data-dirs</h3>
<div class="informalexample"><pre class="programlisting">(define-values
  (%return full-path)
  (key-file:load-from-data-dirs self file flags))
</pre></div>
<p>This function looks for a key file named <em class="parameter"><code>file</code></em> in the paths
returned from <code class="function">g_get_user_data_dir()</code> and <code class="function">g_get_system_data_dirs()</code>,
loads the file into <em class="parameter"><code>key_file</code></em> and returns the file's full path in
<em class="parameter"><code>full_path</code></em>.  If the file could not be loaded then an <code class="constant">error</code> is
set to either a <span class="type">GFileError</span> or <span class="type">GKeyFileError</span>.</p>
<div class="refsect3">
<a name="id-1.1.29.3.23.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>an empty <span class="type">GKeyFile</span> struct</p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>file</p></td>
<td class="parameter_description">
<p>a relative path to a filename to open and parse</p>
<p>Passed as <code class="code">file</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>full_path</p></td>
<td class="parameter_description">
<p>return location for a string containing the full path
  of the file, or <code class="constant">NULL</code></p>
<p>Passed as <code class="code">full-path</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description">
<p>flags from <span class="type">GKeyFileFlags</span></p>
<p>Passed as <code class="code">flags</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.24"></a><h3>load-from-dirs</h3>
<div class="informalexample"><pre class="programlisting">(define-values
  (%return full-path)
  (key-file:load-from-dirs self file search-dirs flags))
</pre></div>
<p>This function looks for a key file named <em class="parameter"><code>file</code></em> in the paths
specified in <em class="parameter"><code>search_dirs</code></em>, loads the file into <em class="parameter"><code>key_file</code></em> and
returns the file's full path in <em class="parameter"><code>full_path</code></em>.
</p>
<p>If the file could not be found in any of the <em class="parameter"><code>search_dirs</code></em>,
<code class="constant">G_KEY_FILE_ERROR_NOT_FOUND</code> is returned. If
the file is found but the OS returns an error when opening or reading the
file, a <code class="constant">G_FILE_ERROR</code> is returned. If there is a problem parsing the file, a
<code class="constant">G_KEY_FILE_ERROR</code> is returned.</p>
<div class="refsect3">
<a name="id-1.1.29.3.24.5"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>an empty <span class="type">GKeyFile</span> struct</p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>file</p></td>
<td class="parameter_description">
<p>a relative path to a filename to open and parse</p>
<p>Passed as <code class="code">file</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>search_dirs</p></td>
<td class="parameter_description">
<p><code class="constant">NULL</code>-terminated array of directories to search</p>
<p>Passed as <code class="code">search-dirs</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>full_path</p></td>
<td class="parameter_description">
<p>return location for a string containing the full path
  of the file, or <code class="constant">NULL</code></p>
<p>Passed as <code class="code">full-path</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description">
<p>flags from <span class="type">GKeyFileFlags</span></p>
<p>Passed as <code class="code">flags</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.25"></a><h3>load-from-file?</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:load-from-file? self file flags))
</pre></div>
<p>Loads a key file into an empty <span class="type">GKeyFile</span> structure.
</p>
<p>If the OS returns an error when opening or reading the file, a
<code class="constant">G_FILE_ERROR</code> is returned. If there is a problem parsing the file, a
<code class="constant">G_KEY_FILE_ERROR</code> is returned.
</p>
<p>This function will never return a <code class="constant">G_KEY_FILE_ERROR_NOT_FOUND</code> error. If the
<em class="parameter"><code>file</code></em> is not found, <code class="constant">G_FILE_ERROR_NOENT</code> is returned.</p>
<div class="refsect3">
<a name="id-1.1.29.3.25.6"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>an empty <span class="type">GKeyFile</span> struct</p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>file</p></td>
<td class="parameter_description">
<p>the path of a filename to load, in the GLib filename encoding</p>
<p>Passed as <code class="code">file</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description">
<p>flags from <span class="type">GKeyFileFlags</span></p>
<p>Passed as <code class="code">flags</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.26"></a><h3>remove-comment?</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:remove-comment? self group-name key))
</pre></div>
<p>Removes a comment above <em class="parameter"><code>key</code></em> from <em class="parameter"><code>group_name</code></em>.
If <em class="parameter"><code>key</code></em> is <code class="constant">NULL</code> then <em class="parameter"><code>comment</code></em> will be removed above <em class="parameter"><code>group_name</code></em>.
If both <em class="parameter"><code>key</code></em> and <em class="parameter"><code>group_name</code></em> are <code class="constant">NULL</code>, then <em class="parameter"><code>comment</code></em> will
be removed above the first group in the file.</p>
<div class="refsect3">
<a name="id-1.1.29.3.26.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name, or <code class="constant">NULL</code></p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.27"></a><h3>remove-group?</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:remove-group? self group-name))
</pre></div>
<p>Removes the specified group, <em class="parameter"><code>group_name</code></em>,
from the key file.</p>
<div class="refsect3">
<a name="id-1.1.29.3.27.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.28"></a><h3>remove-key?</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:remove-key? self group-name key))
</pre></div>
<p>Removes <em class="parameter"><code>key</code></em> in <em class="parameter"><code>group_name</code></em> from the key file.</p>
<div class="refsect3">
<a name="id-1.1.29.3.28.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key name to remove</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.29"></a><h3>save-to-file?</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:save-to-file? self filename))
</pre></div>
<p>Writes the contents of <em class="parameter"><code>key_file</code></em> to <em class="parameter"><code>filename</code></em> using
<code class="function">g_file_set_contents()</code>. If you need stricter guarantees about durability of
the written file than are provided by <code class="function">g_file_set_contents()</code>, use
<code class="function">g_file_set_contents_full()</code> with the return value of <code class="function">g_key_file_to_data()</code>.
</p>
<p>This function can fail for any of the reasons that
<code class="function">g_file_set_contents()</code> may fail.</p>
<div class="refsect3">
<a name="id-1.1.29.3.29.5"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>filename</p></td>
<td class="parameter_description">
<p>the name of the file to write to</p>
<p>Passed as <code class="code">filename</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.30"></a><h3>set-boolean</h3>
<div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-boolean self group-name key value))
</pre></div>
<p>Associates a new boolean value with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
If <em class="parameter"><code>key</code></em> cannot be found then it is created.</p>
<div class="refsect3">
<a name="id-1.1.29.3.30.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description">
<p><code class="constant">TRUE</code> or <code class="constant">FALSE</code></p>
<p>Passed as <code class="code">value</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.31"></a><h3>set-boolean-list</h3>
<div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-boolean-list self group-name key list))
</pre></div>
<p>Associates a list of boolean values with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
If <em class="parameter"><code>key</code></em> cannot be found then it is created.
If <em class="parameter"><code>group_name</code></em> is <code class="constant">NULL</code>, the start_group is used.</p>
<div class="refsect3">
<a name="id-1.1.29.3.31.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>list</p></td>
<td class="parameter_description">
<p>an array of boolean values</p>
<p>Passed as <code class="code">list</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description">
<p>length of <em class="parameter"><code>list</code></em></p>
<p>Inferred from <code class="code">list</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.32"></a><h3>set-comment?</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:set-comment? self group-name key comment))
</pre></div>
<p>Places a comment above <em class="parameter"><code>key</code></em> from <em class="parameter"><code>group_name</code></em>.
</p>
<p>If <em class="parameter"><code>key</code></em> is <code class="constant">NULL</code> then <em class="parameter"><code>comment</code></em> will be written above <em class="parameter"><code>group_name</code></em>.
If both <em class="parameter"><code>key</code></em> and <em class="parameter"><code>group_name</code></em>  are <code class="constant">NULL</code>, then <em class="parameter"><code>comment</code></em> will be
written above the first group in the file.
</p>
<p>Note that this function prepends a '#' comment marker to
each line of <em class="parameter"><code>comment</code></em>.</p>
<div class="refsect3">
<a name="id-1.1.29.3.32.6"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name, or <code class="constant">NULL</code></p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>comment</p></td>
<td class="parameter_description">
<p>a comment</p>
<p>Passed as <code class="code">comment</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.33"></a><h3>set-double</h3>
<div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-double self group-name key value))
</pre></div>
<p>Associates a new double value with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
If <em class="parameter"><code>key</code></em> cannot be found then it is created.</p>
<div class="refsect3">
<a name="id-1.1.29.3.33.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description">
<p>a double value</p>
<p>Passed as <code class="code">value</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.34"></a><h3>set-double-list</h3>
<div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-double-list self group-name key list))
</pre></div>
<p>Associates a list of double values with <em class="parameter"><code>key</code></em> under
<em class="parameter"><code>group_name</code></em>.  If <em class="parameter"><code>key</code></em> cannot be found then it is created.</p>
<div class="refsect3">
<a name="id-1.1.29.3.34.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>list</p></td>
<td class="parameter_description">
<p>an array of double values</p>
<p>Passed as <code class="code">list</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description">
<p>number of double values in <em class="parameter"><code>list</code></em></p>
<p>Inferred from <code class="code">list</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.35"></a><h3>set-int64</h3>
<div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-int64 self group-name key value))
</pre></div>
<p>Associates a new integer value with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
If <em class="parameter"><code>key</code></em> cannot be found then it is created.</p>
<div class="refsect3">
<a name="id-1.1.29.3.35.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description">
<p>an integer value</p>
<p>Passed as <code class="code">value</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.36"></a><h3>set-integer</h3>
<div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-integer self group-name key value))
</pre></div>
<p>Associates a new integer value with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
If <em class="parameter"><code>key</code></em> cannot be found then it is created.</p>
<div class="refsect3">
<a name="id-1.1.29.3.36.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description">
<p>an integer value</p>
<p>Passed as <code class="code">value</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.37"></a><h3>set-integer-list</h3>
<div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-integer-list self group-name key list))
</pre></div>
<p>Associates a list of integer values with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
If <em class="parameter"><code>key</code></em> cannot be found then it is created.</p>
<div class="refsect3">
<a name="id-1.1.29.3.37.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>list</p></td>
<td class="parameter_description">
<p>an array of integer values</p>
<p>Passed as <code class="code">list</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description">
<p>number of integer values in <em class="parameter"><code>list</code></em></p>
<p>Inferred from <code class="code">list</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.38"></a><h3>set-list-separator</h3>
<div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-list-separator self separator))
</pre></div>
<p>Sets the character which is used to separate
values in lists. Typically ';' or ',' are used
as separators. The default list separator is ';'.</p>
<div class="refsect3">
<a name="id-1.1.29.3.38.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>separator</p></td>
<td class="parameter_description">
<p>the separator</p>
<p>Passed as <code class="code">separator</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.39"></a><h3>set-locale-string</h3>
<div class="informalexample"><pre class="programlisting">(define-values
  ()
  (key-file:set-locale-string self group-name key locale string))
</pre></div>
<p>Associates a string value for <em class="parameter"><code>key</code></em> and <em class="parameter"><code>locale</code></em> under <em class="parameter"><code>group_name</code></em>.
If the translation for <em class="parameter"><code>key</code></em> cannot be found then it is created.</p>
<div class="refsect3">
<a name="id-1.1.29.3.39.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>locale</p></td>
<td class="parameter_description">
<p>a locale identifier</p>
<p>Passed as <code class="code">locale</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>string</p></td>
<td class="parameter_description">
<p>a string</p>
<p>Passed as <code class="code">string</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.40"></a><h3>set-locale-string-list</h3>
<div class="informalexample"><pre class="programlisting">(define-values
  ()
  (key-file:set-locale-string-list self group-name key locale list))
</pre></div>
<p>Associates a list of string values for <em class="parameter"><code>key</code></em> and <em class="parameter"><code>locale</code></em> under
<em class="parameter"><code>group_name</code></em>.  If the translation for <em class="parameter"><code>key</code></em> cannot be found then
it is created.</p>
<div class="refsect3">
<a name="id-1.1.29.3.40.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>locale</p></td>
<td class="parameter_description">
<p>a locale identifier</p>
<p>Passed as <code class="code">locale</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>list</p></td>
<td class="parameter_description">
<p>a <code class="constant">NULL</code>-terminated array of locale string values</p>
<p>Passed as <code class="code">list</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description">
<p>the length of <em class="parameter"><code>list</code></em></p>
<p>Inferred from <code class="code">list</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.41"></a><h3>set-string</h3>
<div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-string self group-name key string))
</pre></div>
<p>Associates a new string value with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
If <em class="parameter"><code>key</code></em> cannot be found then it is created.
If <em class="parameter"><code>group_name</code></em> cannot be found then it is created.
Unlike <code class="function">g_key_file_set_value()</code>, this function handles characters
that need escaping, such as newlines.</p>
<div class="refsect3">
<a name="id-1.1.29.3.41.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>string</p></td>
<td class="parameter_description">
<p>a string</p>
<p>Passed as <code class="code">string</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.42"></a><h3>set-string-list</h3>
<div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-string-list self group-name key list))
</pre></div>
<p>Associates a list of string values for <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
If <em class="parameter"><code>key</code></em> cannot be found then it is created.
If <em class="parameter"><code>group_name</code></em> cannot be found then it is created.</p>
<div class="refsect3">
<a name="id-1.1.29.3.42.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>list</p></td>
<td class="parameter_description">
<p>an array of string values</p>
<p>Passed as <code class="code">list</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description">
<p>number of string values in <em class="parameter"><code>list</code></em></p>
<p>Inferred from <code class="code">list</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.43"></a><h3>set-uint64</h3>
<div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-uint64 self group-name key value))
</pre></div>
<p>Associates a new integer value with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
If <em class="parameter"><code>key</code></em> cannot be found then it is created.</p>
<div class="refsect3">
<a name="id-1.1.29.3.43.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description">
<p>an integer value</p>
<p>Passed as <code class="code">value</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.44"></a><h3>set-value</h3>
<div class="informalexample"><pre class="programlisting">(define-values () (key-file:set-value self group-name key value))
</pre></div>
<p>Associates a new value with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
</p>
<p>If <em class="parameter"><code>key</code></em> cannot be found then it is created. If <em class="parameter"><code>group_name</code></em> cannot
be found then it is created. To set an UTF-8 string which may contain
characters that need escaping (such as newlines or spaces), use
<code class="function">g_key_file_set_string()</code>.</p>
<div class="refsect3">
<a name="id-1.1.29.3.44.5"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>group_name</p></td>
<td class="parameter_description">
<p>a group name</p>
<p>Passed as <code class="code">group-name</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description">
<p>a key</p>
<p>Passed as <code class="code">key</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description">
<p>a string</p>
<p>Passed as <code class="code">value</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.45"></a><h3>to-data</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return length) (key-file:to-data self))
</pre></div>
<p>This function outputs <em class="parameter"><code>key_file</code></em> as a string.
</p>
<p>Note that this function never reports an error,
so it is safe to pass <code class="constant">NULL</code> as <em class="parameter"><code>error</code></em>.</p>
<div class="refsect3">
<a name="id-1.1.29.3.45.5"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description">
<p>return location for the length of the
  returned string, or <code class="constant">NULL</code></p>
<p>Passed as <code class="code">length</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.46"></a><h3>unref</h3>
<div class="informalexample"><pre class="programlisting">(define-values () (key-file:unref self))
</pre></div>
<p>Decreases the reference count of <em class="parameter"><code>key_file</code></em> by 1. If the reference count
reaches zero, frees the key file and all its allocated memory.</p>
<div class="refsect3">
<a name="id-1.1.29.3.46.4"></a><h4>Parameters</h4>
<div class="informaltable"><table><tr>
<td class="parameter_name"><p>key_file</p></td>
<td class="parameter_description">
<p>a <span class="type">GKeyFile</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr></table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.47"></a><h3>key-file:new</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:new))
</pre></div>
<p>Undocumented</p>
</div>
<div class="refsect2">
<a name="id-1.1.29.3.48"></a><h3>key-file:error-quark</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (key-file:error-quark))
</pre></div>
<p>Undocumented</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>
